-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
National platforms #57
Conversation
760ca0d
to
dafe187
Compare
3575f61
to
ead61f8
Compare
0e059b0
to
81bf01c
Compare
@MathewBiddle we need to be a bit careful with this one b/c I had two difficult rebasing to catch up with #56 and #54. We should check if we still have all the metrics functions expected and/or if we don't have duplicates. Once we merge this I'll send a final PR making it a package, publish, and then folks can run any metric they want by just installing this and calling the proper function. |
|
I have plans to investigate that later but it is not gliderpy it is some bad dates in the data that cannot be parsed with vanilla pandas. In theory, it is OK. However, as we are closely responsible for that date, we should investigate. I'll let you know what I find soon but I need to read every time variable data point to find which one is triggering that... So I'm not doing that today 😬 |
81bf01c
to
d924b1f
Compare
looks like I'm getting a timeout from, https://opendap.co-ops.nos.noaa.gov/stations/stationsXML.jsp.
Url should be https://opendap.co-ops.nos.noaa.gov/stations/stationsXML.jsp (no clue what is different?) |
If you try to navigate there you should get a 504. Let's see if the service is restored later today/tomorrow. |
5d91062
to
d53ae59
Compare
FYI, these tests have been running >13min... |
The "slow" glider test takes that long. I'm waiting for Kathy's answer to figure out what to do with it. |
@MathewBiddle I made a few modifications to this PR after our slack conversation with Kathy:
|
I am trying to look through metric.log but there are a lot of pdfminer logs written. Below is the error I'm getting right now:
|
It is our usual ERDDAP server down ;-p https://erddap.ioos.us/erddap/tabledap/ I'll improve the logging system to make it easier to stop network problems. |
a4a1705
to
d0182a5
Compare
Both the our logs and the CI logs are easier to parse now. This is the CI logs:
Note that network issues here are expected and I hope to run this as a cron job to catch them early. The code per se is ready for review. |
After rebooting ERDDAP (ioos/erddap-gold-standard#69), this is running successfully now. |
08ddbc5
to
03ac038
Compare
03ac038
to
32588ce
Compare
Testing this PR and I run into an issue with missing df2 = ioos_metrics.ioos_metrics.update_metrics()
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\externals\loky\process_executor.py", line 463, in _process_worker
r = call_item()
^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
return self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 589, in __call__
return [func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\Documents\GitProjects\ioos_metrics\ioos_metrics\ioos_metrics.py", line 335, in atn_deployments
return atn
^^^
UnboundLocalError: cannot access local variable 'atn' where it is not associated with a value
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-da9d358039b7>", line 1, in <module>
df2 = ioos_metrics.ioos_metrics.update_metrics()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\Documents\GitProjects\ioos_metrics\ioos_metrics\ioos_metrics.py", line 575, in update_metrics
columns = dict(zip(functions.keys(), values, strict=False))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 1595, in _get_outputs
yield from self._retrieve()
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 1699, in _retrieve
self._raise_error_fast()
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 1734, in _raise_error_fast
error_job.get_result(self.timeout)
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 736, in get_result
return self._return_or_raise()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Mathew.Biddle\programs\Miniforge\envs\ioos-metrics\Lib\site-packages\joblib\parallel.py", line 754, in _return_or_raise
raise self._result
UnboundLocalError: cannot access local variable 'atn' where it is not associated with a value |
This looks good now. I'm merging so we can move forward. However, ATN website needs to be updated and then the full pdf miner logs are still unbearable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this knowing that ATN deployments will fail at the moment.
I'll open issue for cleaner logs and fix the ATN URL. |
Ported from #56:
run_metrics.ipynb
toIOOS_BTN.ipynb
when all PRs are approved.CO-OPS
This code returns 381 stations but searvey reports a lower number (366) of active stations and higher total if we add the discontinued ones (446):
Not sure which data source is better to answer that question. Searvey does have this warning but I'm not sure if that means the API they are hitting is outdated in terms of usability or data updates.
NERRS
The code returns 93 but there is a comment in the notebook that it should be around 140
PS: The current refactor is used in this example.